﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wimm.UI.ViewModels
{
    public class FinancialStuff
    {
        public int Year { get; set; }
        public string Month { get; set; }
        public int Amount { get; set; }
        public string YearMonth { get { return Month + " " + Year + " "; } }
        public FinancialStuff(string month, int year, int amount)
        {
            this.Month = month; this.Year = year; this.Amount = amount;
        }
    }

    public class YearDiagramViewModel : ViewModelBase
    {
        private List<FinancialStuff> _expenseList;
        private List<FinancialStuff> _incomeList;

        public List<FinancialStuff> ExpenseList
        {
            get
            {
                return _expenseList;
            }
            set
            {
                Set<List<FinancialStuff>>(() => ExpenseList, ref _expenseList, value);
            }
        }

        public List<FinancialStuff> IncomeList
        {
            get
            {
                return _incomeList;
            }
            set
            {
                Set<List<FinancialStuff>>(() => IncomeList, ref _incomeList, value);
            }
        }

        public void SetChartSeries(List<FinancialStuff> expenseList, List<FinancialStuff> incomeList)
        {
            ExpenseList = expenseList;
            IncomeList = incomeList;
        }
    }
}
